import * as React from 'react';
import {render} from 'react-dom';
import {Router, Route, IndexRoute, hashHistory} from 'react-router';
import {AdList} from './pages/adManage/ad/Ad';
import {PositionList} from './pages/adManage/adPosition/Position';
import {BuList} from './pages/configManage/bu/Bu';
import {AppList} from './pages/configManage/app/App';
import {PlatFormList} from './pages/configManage/platForm/PlatForm';
import {PageList} from './pages/configManage/page/Page';
import {TagList} from './pages/configManage/tag/Tag';
import {SudokuList} from './pages/appManage/sudoku/Sudoku';
import {UserList} from './pages/userManage/user/User';
import {Home} from './pages/home/HomeView';
import {AdminLayout} from './pages/layout/LayoutView';

render(
    <Router history={hashHistory}>
        <Route path="/" component={AdminLayout}>
            {/*<Route path="/list" component={List}/>*/}
            <IndexRoute component={Home}/>
            <Route path="/adManage">
                <Route path="/adManage/ad" component={AdList}/>
                <Route path="/adManage/Position" component={PositionList}/>
            </Route>
            <Route path="/configManage">
                <Route path="/configManage/bu" component={BuList}/>
                <Route path="/configManage/app" component={AppList}/>
                <Route path="/configManage/platForm" component={PlatFormList}/>
                <Route path="/configManage/page" component={PageList}/>
                <Route path="/configManage/tag" component={TagList}/>
            </Route>
            <Route path="/appManage">
                <Route path="/appManage/sudoku" component={SudokuList}/>
            </Route>
            <Route path="/userManage">
                <Route path="/userManage/user" component={UserList}/>
            </Route>
        </Route>
    </Router>
    , document.getElementById('App'));



